/**
 * @filename:SysField 2022年1月27日
 * @project Wonder wallet Framework  V1.0
 * Copyright(c) 2020 LuZhongren Co. Ltd. 
 * All right reserved. 
 */
package com.wonder.admin.domain;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;



/**   
 * @Description:TODO(模块字段管理实体类)
 * 
 * @version: V1.0
 * @author: LuZhongren
 * 
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_field")
@ApiModel(value="field对象", description="模块字段管理表")
public class SysField extends Model<SysField> {

	private static final long serialVersionUID = 1643434996864L;
	
	@TableId(value ="id", type = IdType.AUTO)
	@ApiModelProperty(name = "id" , value = "ID")
	private Long id;
    
 	@TableField(value = "menu_id")
	@ApiModelProperty(name = "menu_id" , value = "模块ID")
	private Long menu_id;
    
 	@TableField(value = "title")
	@ApiModelProperty(name = "title" , value = "字段名称")
	private String title;
    
 	@TableField(value = "field")
	@ApiModelProperty(name = "field" , value = "字段")
	private String field;
    
 	@TableField(value = "type")
	@ApiModelProperty(name = "type" , value = "表单类型1输入框 2下拉框 3单选框 4多选框 5上传图片 6编辑器 7时间")
	private Integer type;
    
 	@TableField(value = "list_show")
	@ApiModelProperty(name = "list_show" , value = "列表显示")
	private Integer list_show;
    
 	@TableField(value = "search_type")
	@ApiModelProperty(name = "search_type" , value = "1精确匹配 2模糊搜索")
	private Integer search_type;
    
 	@TableField(value = "post_status")
	@ApiModelProperty(name = "post_status" , value = "是否前台录入")
	private Integer post_status;
    
 	@TableField(value = "create_table_field")
	@ApiModelProperty(name = "create_table_field" , value = "是否创建字段")
	private Integer create_table_field;
    
 	@TableField(value = "validate")
	@ApiModelProperty(name = "validate_table" , value = "验证方式")
	private String validate_table;
 	
 	@TableField(exist = false)
	@ApiModelProperty(name = "validate" , value = "验证方式")
	private String[] validate;
    
 	@TableField(value = "rule")
	@ApiModelProperty(name = "rule" , value = "验证规则")
	private String rule;
    
 	@TableField(value = "sortid")
	@ApiModelProperty(name = "sortid" , value = "排序号")
	private Integer sortid;
 	
 	@TableField(value = "sortable")
	@ApiModelProperty(name = "sortable" , value = "是否显示排序")
	private Integer sortable;
 	
 	@TableField(value = "show_total")
	@ApiModelProperty(name = "show_total" , value = "是否求和")
	private Integer show_total;
 	
 	@TableField(value = "mult_language")
	@ApiModelProperty(name = "mult_language" , value = "多语言")
	private Integer mult_language;

 	@TableField(value = "foreign_key")
	@ApiModelProperty(name = "foreign_key" , value = "是否外键")
	private Integer foreign_key;
 	
 	@TableField(value = "`refer_module`")
	@ApiModelProperty(name = "refer_module" , value = "选择模块")
	private String refer_module;
 	
 	@TableField(value = "`sql`")
	@ApiModelProperty(name = "sql" , value = "字段配置数据源sql")
	private String sql;
    
 	@TableField(value = "default_value")
	@ApiModelProperty(name = "default_value" , value = "默认值")
	private String default_value;
    
 	@TableField(value = "datatype")
	@ApiModelProperty(name = "datatype" , value = "字段数据类型")
	private String datatype;
    
 	@TableField(value = "length")
	@ApiModelProperty(name = "length" , value = "字段长度")
	private String length;
    
 	@TableField(value = "indexdata")
	@ApiModelProperty(name = "indexdata" , value = "索引")
	private String indexdata;
    
 	@TableField(value = "show_condition")
	@ApiModelProperty(name = "show_condition" , value = "显示条件")
	private String show_condition;
    
 	@TableField(value = "item_config")
	@ApiModelProperty(name = "item_config_table" , value = "字段配置")
	private String item_config_table;
 	
 	@TableField(exist = false)
	@ApiModelProperty(name = "item_config" , value = "字段配置")
	private List<Map<String, Object>> item_config;
    
 	@TableField(value = "width")
	@ApiModelProperty(name = "width" , value = "单元格宽度")
	private String width;
    
 	@TableField(value = "datetime_config")
	@ApiModelProperty(name = "datetime_config" , value = "其他配置")
	private String datetime_config;
    
 	@TableField(value = "other_config")
	@ApiModelProperty(name = "other_config_table" , value = "其他配置")
	private String other_config_table;
 	
 	
	@TableField(exist = false )
	@ApiModelProperty(name = "other_config" , value = "其他配置")
	private Map<String, Object> other_config;
	
 	@TableField(value = "formula_id")
	@ApiModelProperty(name = "formula_id" , value = "编号或订单号")
	private String formula_id;
    
 	@TableField(value = "belong_table")
	@ApiModelProperty(name = "belong_table" , value = "虚拟字段所属表 用户多表关联")
	private String belong_table;
 	  
 	@TableField(exist = false )
 //	@JsonIgnore
	@ApiModelProperty(name = "belong_column" , value = "关联表字段")
	private String belong_column;
 	
 	@TableField(exist = false )
 //	@JsonIgnore
	@ApiModelProperty(name = "is_main_table" , value = "是否主表字段")
	private boolean is_main_table=false;
 	
 	@TableField(exist = false )
// 	@JsonIgnore
	@ApiModelProperty(name = "javatype" , value = "JAVA类型名")
	private String javatype;
 	
 	@TableField(exist = false )
 //	@JsonIgnore
	@ApiModelProperty(name = "dropDownSql" , value = "下拉SQL")
	private String dropDownSql;
 	
 	@TableField(exist = false )
 	@JsonIgnore
	@ApiModelProperty(name = "is_keywords" , value = "是否MySQL关键字")
	private boolean isKeywords=false;
 	

	@Override
    public Serializable pkVal() {
        return this.id;
    }
}
